package com.pay.order.controller;

import com.pay.common.utils.Result;
import com.pay.order.pojo.TOrder;
import com.pay.order.service.TOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/order/order")
public class OrderController {

    @Autowired
    private TOrderService tOrderService;


    /**
     * 添加订单
     * @param tOrders
     * @return
     */
    @PostMapping("/addOrder")
    public Result addOrder(@RequestBody  List<TOrder> tOrders) {
        return tOrderService.addOrder(tOrders);
    }
}
